package com.example.mynews.UI;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;

import androidx.appcompat.app.AppCompatActivity;

import com.example.mynews.R;

public class web_content extends AppCompatActivity {

    private WebView webview;
    private ImageView img_back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web_content);
        initView();
        inifuction();
    }

    private void initView() {
        webview = (WebView) findViewById(R.id.webview);
        img_back = (ImageView) findViewById(R.id.img_back);

    }

    private void inifuction() {
        String url = getIntent().getStringExtra("url");
        webview.loadUrl("http://192.168.1.109:8080/web_home" + url);
        img_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }
}